System and method for managing file system references at scale

ABSTRACT

A system for managing file systems includes memory. The system also includes a manager. The memory is used for storing in-memory data structures. The manager obtains file system references for a file system from a file system manager. The file system manager utilizes storage to provide the file system references. The manager stores the file system references in an in-memory data structure in the memory. To service file system reference requests, the manager utilizes uses the in-memory data structure to service at least one of the file system reference requests.

BACKGROUND

Devices may generate new data based on existing data. For example,devices may obtain data and derive new data based on the obtained data.When data is generated, it may need to be stored for future use.

SUMMARY

In one aspect, a system for managing file systems in accordance with oneor more embodiments of the invention includes memory and a manager. Themanager obtains file system references for a file system from a filesystem manager that utilizes storage to provide the file systemreferences; stores the file system references in an in-memory datastructure in the memory; and services a file system reference requestfor the file system using the in-memory data structure.

In one aspect, a method for managing file systems in accordance with oneor more embodiments of the invention includes obtaining file systemreferences for a file system from a file system manager that utilizesstorage to provide the file system references; storing the file systemreferences in an in-memory data structure; and servicing a file systemreference request for the file system using the in-memory datastructure.

In one aspect, a non-transitory computer readable medium in accordancewith one or more embodiments of the invention includes computer readableprogram code, which when executed by a computer processor enables thecomputer processor to perform a method for managing file systems. Themethod includes obtaining file system references for a file system froma file system manager that utilizes storage to provide the file systemreferences; storing the file system references in an in-memory datastructure; and servicing a file system reference request for the filesystem using the in-memory data structure.

BRIEF DESCRIPTION OF DRAWINGS

Certain embodiments of the invention will be described with reference tothe accompanying drawings. However, the accompanying drawings illustrateonly certain aspects or implementations of the invention by way ofexample and are not meant to limit the scope of the claims.

FIG. 1 shows a diagram of a system in accordance with one or moreembodiments of the invention.

FIG. 2 shows a diagram of a file system reference list in accordancewith one or more embodiments of the invention.

FIG. 3 shows a flowchart of a method of servicing a file systemreference request in accordance with one or more embodiments of theinvention.

FIG. 4 shows a flowchart of a method of obtaining a file system entry inaccordance with one or more embodiments of the invention.

FIG. 5 shows a flowchart of a method of repopulating a file system entrywith file system references in accordance with one or more embodimentsof the invention.

FIG. 6 shows a flowchart of a method of obtaining a file systemreference in accordance with one or more embodiments of the invention.

FIG. 7 shows a flowchart of a method of servicing an access removalrequest in accordance with one or more embodiments of the invention.

FIG. 8.1 shows a diagram of an example system.

FIGS. 8.2-8.3 show diagrams of interactions between and actionsperformed by components of the example system of FIG. 8.1 over time.

FIG. 9 shows a diagram of a computing device in accordance with one ormore embodiments of the invention.

DETAILED DESCRIPTION

Specific embodiments will now be described with reference to theaccompanying figures. In the following description, numerous details areset forth as examples of the invention. It will be understood by thoseskilled in the art that one or more embodiments of the present inventionmay be practiced without these specific details and that numerousvariations or modifications may be possible without departing from thescope of the invention. Certain details known to those of ordinary skillin the art are omitted to avoid obscuring the description.

In the following description of the figures, any component describedwith regard to a figure, in various embodiments of the invention, may beequivalent to one or more like-named components described with regard toany other figure. For brevity, descriptions of these components will notbe repeated with regard to each figure. Thus, each and every embodimentof the components of each figure is incorporated by reference andassumed to be optionally present within every other figure having one ormore like-named components. Additionally, in accordance with variousembodiments of the invention, any description of the components of afigure is to be interpreted as an optional embodiment, which may beimplemented in addition to, in conjunction with, or in place of theembodiments described with regard to a corresponding like-namedcomponent in any other figure.

Throughout this application, elements of figures may be labeled as A toN. As used herein, the aforementioned labeling means that the elementmay include any number of items and does not require that the elementinclude the same number of elements as any other item labeled as A to N.For example, a data structure may include a first element labeled as Aand a second element labeled as N. This labeling convention means thatthe data structure may include any number of the elements. A second datastructure, also labeled as A to N, may also include any number ofelements. The number of elements of the first data structure and thenumber of elements of the second data structure may be the same ordifferent.

In general, embodiments of the invention relate to systems, devices, andmethods for assigning file system references. A file system referencemay be a data structure used to enable an entity (e.g., an application)to access data managed by a file system. The entity may be unable toaccess the data managed by the file system prior to having a file systemreference assigned to the entity.

To assign file system references, a system in accordance withembodiments of the invention may pre-allocate file system referencesprior to when the file system references are needed for assignmentpurposes. The pre-allocated file system references may be stored in anin-memory data structure. By pre-allocating and storing the file systemreferences in memory, a system in accordance with embodiments of theinvention may be able to handle servicing of a higher file systemreference assignment loads by avoiding the computational impact ofassigning file system references via file system managers or otherentities that rely on the use of storage resources for performing suchassignments.

FIG. 1 shows a system (100) in accordance with one or more embodimentsof the invention. The system (100) may provide any number of computerimplemented services. The computer implemented services may include, forexample, database services, file serving, electronic communicationservices, etc.

To provide such services, the system (100) may include any number ofapplications (102). Each of the applications (102) may, in isolation orcooperation with other applications and/or other entities, provide all,or a portion, of the computer implemented services provided by thesystem (100). The system (100) may include (e.g., host) none, one, orany number of applications. Different application may provide similarand/or different services.

When providing services, the applications (102) may utilize computingresources (e.g., 110, 112, 114) of the system (100). The computingresources may include, for example, processing resources (110), memoryresources (112), and/or storage resources (114). The computing resourcesmay be provided by a hardware layer (108) of the system (100).

The hardware layer (108) may represent the computing resources providedby computing devices of the system (100). Each of the computing devicesof the system (100) may include hardware that contributes computingresources (e.g., 110, 112, 114) to the system (100). For additionaldetails regarding computing devices, refer to FIG. 9.

To manage the use of the computing resources by the applications (102)and/or other entities, the system (100) may include (e.g., host) anynumber of operating system (106). The operating system (106) may managethe hardware layer (108). Managing the hardware layer (108) may includeallocating and/or enabling access to portions of the computing resources(e.g., 110, 112, 114) provided by the hardware layer (108) to theapplications (102).

For example, to enable the applications (102) to store data for futureuse, the operating systems (106) may include file system managers orother management entities that logically define the layout of storeddata in physical storage devices. The file system managers may interactwith the applications (102) to enable the applications (102) to (i)store data in physical storage devices of computing devices of thehardware layer (108) for which the file system managers logically definethe layout of stored data and (ii) read data from the physical storagedevices.

To enable the applications (102) to store and read data, the file systemmanagers may dynamically assign file system references to theapplications (102) before the respective applications (102) are allowedto store/read data from the file systems. In other words, to providefile system access to the applications (102).

The file system managers may utilize the file system references toservice data access requests (e.g., requests to store data or readstored data) from the applications (102) and/or other entities. Forexample, the file system may require that the file system reference beincluded as part of data access requests. By doing so, the file systemmanager may be able to identify a requesting entity using the filesystem reference.

When a file system manager assigns a file system reference, the filesystem reference may need to be recorded as being previously assigned sothat the file system reference is not provided to multiple entities.Assignment information with respect to file system references may bestored in one or more of the physical storage devices managed (in partor completely) by the file system manager.

Due to the prevalence of parallel processing and/or out of orderprocessing, assigning a file system reference may require temporarilylocking of access to the file system during the assignment. For example,if multiple file system reference requests need to be serviced duringthe same period of time, parallel processing and/or out of orderprocessing may cause the same file system reference to be assigned tomultiple entities if the file system is not locked (e.g., limitingaccess). Consequently, file system reference assignments via a filesystem manager may temporarily prevent entities from access to the filesystem due to (i) locking of the file system or (ii) waiting for queuedfile system reference requests to be processed.

However, locking the (or a portion of the) file system during a filesystem reference assignment may impact the ability of the applications(102) and/or other entities to provide their functionalities. Forexample, when multiple entities simultaneously need to be provided filesystem references, the file system may be locked for periods of timethat impact the ability of the applications (102) and/or other entitiesto provide their services that depend on having access to the storageresources (114).

Embodiments of the invention may address the above and/or other concernsby providing a system (100) that includes a file system referencemanager (104). The file system reference manager (104) may manage theassignment of file system references to any number of entities (e.g.,the applications (102)).

To assign file system references, the file system reference manager(104) may obtain file system references from file system managers andstore the file system references as part of an in-memory data structureusing memory resources (112). In other words, the file system referencemanager (104) may pre-allocate file system references prior to when theneed for allocating the file system references arises. Consequently, theallocation of the file system references for pre-allocation purposes maybe performed during periods of time that are unlikely to impact theability of the applications (102) and/or other entities to provide theirservices.

When an entity requests a file system reference from one of theoperating systems (106) (e.g., from a file system manager of anoperating system), the file system reference manager (104) may service(rather than a file system manager) the file system reference requestusing the in-memory data structure. In other words, by utilizing apre-allocated file system reference. By doing so, the potential impacton the functionality of the applications (102) and/or other entities dueto allocation of file system references may be avoided.

Additionally, by utilizing an in-memory data structure, the file systemreference manager (104) may lock access to the in-memory data structure(to avoid similar collision issues, as discussed with respect toallocation of file system references via file system managers) for farsmaller amounts of time than would be required to lock a file systemwhen a file system manager allocates a file system reference. Forexample, only a portion of the in-memory data structure may need to betemporarily locked for allocation purposes and due to the far greateraccess speed of memory (in contrast to access speeds for storage), theamount of time required to allocate a file system reference using thein-memory data structure may be far less than the amount of timerequired to allocate a file system reference using data structuresstored in storage.

When providing its functionality, the file system reference manager(104) may perform all, or a portion, of the methods illustrated in FIGS.3-7. For additional details regarding in-memory data structures, referto FIG. 1.

Each of the components of the system of FIG. 1 may be operably connectedto each other and/or other entities (not shown) using any combinationand quantity of wired and/or wireless networks. Each component of thesystem is discussed below.

The applications (102), file system reference manager (104), and/oroperating systems (106) may be implemented using computing devices(e.g., computing devices of the hardware layer (108). The computingdevices may be, for example, mobile phones, tablet computers, laptopcomputers, desktop computers, servers, or cloud resources. The computingdevices may include one or more processors, memory (e.g., random accessmemory), and persistent storage (e.g., disk drives, solid state drives,etc.). The persistent storage may store computer instructions, e.g.,computer code, that (when executed by the processor(s) of the computingdevice) cause the computing device to perform all, or a portion, of thefunctions described in this application and/or all, or a portion, of themethods illustrated in FIGS. 3-8. The applications (102), file systemreference manager (104), and/or operating systems (106) may beimplemented using other types of computing devices without departingfrom the invention. For additional details regarding computing devices,refer to FIG. 9.

The hardware layer (108) may be implemented using computing devices(e.g., refer to FIG. 9). The computing devices may be, for example,mobile phones, tablet computers, laptop computers, desktop computers,servers, or cloud resources. The computing devices may include hardwaredevices including one or more processors, memory (e.g., random accessmemory), and persistent storage (e.g., disk drives, solid state drives,etc.). The aforementioned hardware devices may provide computingresources including the processing resources (110), the memory resources(112), and/or the storage resources (114). As discussed above, theoperating systems (106) and/or the file system reference manager (104)may enable all, or a portion, of the computing resources (e.g., 110,112, 114) to be utilized by the applications (102) and/or otherentities). The hardware layer (108) may be implemented using other typesof computing devices without departing from the invention. Foradditional details regarding computing devices, refer to FIG. 9.

While the system of FIG. 1 has been illustrated as including a limitednumber of specific components, a system in accordance with embodimentsof the invention may include additional, fewer, and/or differentcomponents without departing from the invention.

As discussed above, the system of FIG. 1 may utilize an in-memory datastructure to assign file system references. FIG. 2 shows a diagram of anexample of a file system reference list (200) in accordance withembodiments of the invention. The file system reference list (200) maybe an in-memory data structure that may be used to assign file systemreferences.

The file system reference list (200) may include any number of entries(e.g., 202, 220). Each of the entries may include information that maybe used to assign file system references.

Each of the file system entries (e.g., 202, 220) may include (i) a filesystem identifier (e.g., 204), (ii) an availability indicator (e.g.,206), counters (e.g., 208, 210, 212), and/or file system references(e.g., 222, 224). Each of these portions of the entries of the filesystem reference list (200) is discussed below.

The file system identifier (e.g., 204) may be a data structure thatincludes information that identifies a file system for which the entry(e.g., 202) includes information that may be used to assign file systemreferences for the file system. For example, the file system identifier(e.g., 204) may be a unique identifier such as a name that allows thefile system associated with the entry to be discriminated from otherfile systems that are not associated with the entry.

The availability indicator (e.g., 206) may be a data structure thatincludes information that identifies whether the file system for whichthe entry (e.g., 202) includes information is available. In other words,whether the file system identified by the file system identifier (e.g.,204) of the entry is accessible. For example, file systems may berendered inaccessible from time to time or otherwise removed from asystem. For example, the availability indicator (e.g., 206) may includea flag that indicates whether the file system associated with the entryis available.

The reference counter (e.g., 208) may be a data structure that includesinformation regarding which of the file system references (e.g., 214,216) have been assigned. In other words, as file system references areassigned the reference counter (e.g., 208) may enable the file systemreferences that have not been assigned to be discriminated from the filesystem references that have been assigned.

For example, the reference counter (e.g., 208) may be a numerical valuethat is incremented/decremented when a file system reference isassigned. The value of the numerical value may indicate a correspondingvalue of a file system reference that has not been assigned and forwhich higher/lower values of reference counters have not yet beenassigned.

In another example, the reference counter (e.g., 208) may be a numericalvalue that indicates a position within a logical ordering of the filesystem references that divides the file system references into a firstgroup that includes file system references that have been assigned and asecond group that includes file system references that have not beenassigned.

The current use counter (e.g., 210) may be a data structure thatspecifies whether an assignment of a file system reference has beenstarted. In other words, when an assignment of a file system referenceis initiated, the current use counter (e.g., 210) may be incremented ordecremented to indicate that the assignment has started. For example,current use counter (e.g., 210) may be a numerical value that isincremented/decremented when a file system reference assignment isinitiated.

The completed use counter (e.g., 212) may be a data structure thatspecifies whether an assignment of a file system reference that has beenstarted has also completed. In other words, after an assignment of afile system reference is initiated, the completed use counter (e.g.,212) may be incremented or decremented when the assignment is completedto indicate that the assignment has completed. For example, thecompleted use counter (e.g., 212) may be a numerical value that isincremented/decremented when a file system reference assignment isinitiated.

The values of the current use counter (e.g., 210) and the completed usecounter (e.g., 212) may be utilized to ascertain (i) whether anassignment has started and (ii) whether a started assignment hascompleted. For example, consider a scenario where the current usecounter (e.g., 210) and the completed use counter (e.g., 212) areimplemented as respective counters that are incremented by a file systemreference manager (e.g., 104, FIG. 1) upon initiation/completion of afile system reference assignment. When an assignment is initiated, thevalue of the current use counter (e.g., 210) may be different from thecompleted use counter. When an assignment is completed (indicating thatanother assignment may be initiated without concern for collision with acurrently being performed assignment), the value of the completed usecounter (e.g., 212) may match the value of the current use counter(e.g., 210).

Accordingly, these counters, in combination, may indicate an activitystate of the corresponding entry. When an entry is in an active activitystate, the entry may be used to perform an assignment of a file systemreference. In other words, when in an active activity state, a filesystem reference may be performed without risking collision with anassignment that is currently being performed. Consequently, setting thevalues of these counters to the same value and/or otherwise indicatingan active activity state may place the entry into an unlocked state.That is, the file system reference manager (e.g., 104, FIG. 1) and/orother entities may view the entry as available forreading/modifying/otherwise utilizing when in the active activity state.

In contrast, when the entry is in an inactive activity state, asindicated by the counters having different values, the entry (e.g., 202)may be locked and unusable to perform an assignment of a file systemreference. In other words, when in an inactive activity state, a filesystem reference may not be performed without risking collision with anassignment that is currently being performed. Consequently, setting thevalues of these counters to different values and/or otherwise indicatingan inactive activity state may place the entry into a locked state. Thatis, the file system reference manager (e.g., 104, FIG. 1) and/or otherentities may view the entry (e.g., 202) as unavailable forreading/modifying/otherwise utilizing when in the inactive activitystate.

The file system references (e.g., 214, 216) may be data structures thatinclude file system references obtained from a file system manager. Forexample, the file system references included in the file systemreferences (e.g., 214, 216) may be obtained from a file system managerof a file system identified by the file system identifier (e.g., 204).The file system entry (e.g., 202) may include any number of file systemreferences (e.g., 214, 216). Each of the file system references may, asdiscussed above, include information usable to access the file systemidentified by the file system identifier (e.g., 204).

The file system reference list (200) may be stored in memory of thesystem of FIG. 1. In other words, the file system reference list (200)may be in in-memory data structure. A copy of the file system referencelist (200) may be stored in storage without departing from theinvention.

While the file system reference list (200) has been illustrated asincluding a limited amount of specific information, the file systemreference list (200) may include addition, less, and/or differentinformation without departing from the embodiments of the invention.Further, the file system reference list (200) may be combined with otherdata structures, subdivided into any number of data structures, may bestored in other locations (e.g., in memory of another device), and/orspanned across any number devices without departing from embodiments ofthe invention. The file system reference list (200) may be implementedusing, for example, lists, tables, linked lists, databases, and/or othertypes of data structures.

As discussed above, the system of FIG. 1 may provide file systemassignment services to enable applications hosted by the system of FIG.1 to access various file systems used to organize the data of the systemof FIG. 1. FIGS. 3-7 show diagrams of methods that may be performed bycomponents of the system of FIG. 1 when providing file system assignmentservices.

FIG. 3 shows a flowchart of a method in accordance with one or moreembodiments of the invention. The method depicted in FIG. 3 may be usedto provide backup generation services in accordance with one or moreembodiments of the invention. The method shown in FIG. 3 may beperformed by, for example, a file system reference manager (e.g., 104,FIG. 1). Other components of the system in FIG. 1 may perform all, or aportion, of the method of FIG. 3 without departing from the invention.

While FIG. 3 is illustrated as a series of steps, any of the steps maybe omitted, performed in a different order, additional steps may beincluded, and/or any or all of the steps may be performed in a paralleland/or partially overlapping manner without departing from theinvention.

In step 300, a request for a file system reference for a file system isobtained. The file system reference request may be obtained from, forexample, an application. The file system reference may be obtained via amessage from the application.

In step 302, it is determined whether a file system entry for the filesystem exists. The determination may be made by comparing an identifierof the file system to file system entries included in existing filesystem entries to determine whether the file system entry exists (e.g.,determine whether a match is made). If the file system entry (e.g., 202,FIG. 2) exists, the method may proceed to step 306. If the file systementry does not exist, the method may proceed to step 304.

In step 306, it is determined whether the file system entry is active.In other words, whether the file system entry is being used. Thedetermination may be made by comparing the values of the current usecounter (e.g., 210) and the completed use counter (e.g., 212) of thefile system entry. If the values of the counters match, the file systementry may be determined as being active (e.g., usable withoutcollision). If the values of the counters do not match, the file systementry may be determined as being inactive (e.g., unusable withoutcollision).

If the file system entry is active, the method may proceed to step 308.If the file system entry is not active, the method may proceed to step316.

In step 308, it is determined whether any file system references of thefile system entry are available. The determination may be made based ona value of the reference counter (e.g., 208, FIG. 2). For example, ifthe value of the reference counter exceeds the total number of filesystem references included in the file system entry, it may bedetermined that there are no available file system references of thefile system entry.

If it is determined that there are no available file system referencesof the file system entry, the method may proceed to step 312. If it isdetermined that there are available file system references of the filesystem entry, the method may proceed to step 310.

In step 310, the file system entry is repopulated with file systemreferences. Repopulating the file system entry may cause new file systemreferences to be added to the file system entry that may be assigned toentities. The file system entry may be repopulated via the methodillustrated in FIG. 5.

In step 316, a file system reference is obtained from the file systemmanager of the file system. For example, a request for the file systemreference may be sent to the file system manager. The file systemmanager may provide the file system reference in response to therequest. The file system reference provided by the file system managermay not be duplicative of any of the file system references included inthe file system entry. As discussed above, the file system referencesincluded in the file system entry may be obtained from the file systemmanager. Consequently, the file system manager may not provide aduplicative file system reference because the file system manager isaware of all file system references that have been previously allocated.

The method may proceed to step 314 following step 316 and end followingstep 314.

Returning to step 302, the method may proceed to step 304 following step302 if the file system entry for the file system does not exist.

In step 304, a file system entry for the file system is obtained. Thefile system entry may be obtained via the method illustrated in FIG. 4.The method may proceed to step 306, discussed above, following step 304.

Returning to Step 308, the method may proceed to step 312 follow step308 if it is determined that a file system reference in the file systementry is available.

In step 312, a file system reference is obtained from the file systementry. The file system reference may be one of the file systemreferences included in the file system entry. The file system referencemay be obtained from the file system entry via the method illustrated inFIG. 6.

In step 314, the file system reference is provided to a requestingentity. The file system reference may be provided by sending a copy ofthe file system reference to the requesting entity (e.g., the entity forwhich the request of step 300 was initiated).

The method may end following step 314.

Returning to step 306, the method may proceed to step 316 following step306 if the file system entry is not active. Step 316 is discussed above.

Thus, via the method illustrated in FIG. 3, a system in accordance withembodiments of the invention may provide a method for providing filingsystem references on demand without obtaining the file system referencesfrom a file system manager at the time in which the request for the filesystem reference is obtained. Rather, the system may pre-allocate filesystem references and store the pre-allocated file system references inan in-memory data structure. By doing so, embodiments of the inventionmay decrease (i) the amount of time required for file system referencesto be provided and/or (ii) the amount of time during which access tofile system references is locked (e.g., locking access to the in-memorydata structure). Accordingly, a system in accordance with embodiments ofthe invention may be capable of servicing a much higher file systemreference request load than systems that do not utilize an in-memorydata structure.

As discussed above, a file system entry may be obtained when the methodof FIG. 3 is performed in scenarios in which the file system entry doesnot exist. FIG. 4 shows a flowchart of a method in accordance with oneor more embodiments of the invention. The method depicted in FIG. 4 maybe used to obtain a file system entry in accordance with one or moreembodiments of the invention. The method shown in FIG. 4 may beperformed by, for example, a file system reference manager (e.g., 104,FIG. 1). Other components of the system in FIG. 1 may perform all, or aportion, of the method of FIG. 4 without departing from the invention.

While FIG. 4 is illustrated as a series of steps, any of the steps maybe omitted, performed in a different order, additional steps may beincluded, and/or any or all of the steps may be performed in a paralleland/or partially overlapping manner without departing from theinvention.

In step 400, a file system entry is instantiated in a file systemreference list. The file system entry may be instantiated in the filesystem reference list by adding a new file system entry to the filesystem reference list. The file system entry may be instantiated byreallocating an existing file system entry of the file system referencelist.

In step 402, a file system identifier is associated with the file systementry. The file system identifier may be associated by adding a copy ofthe file system identifier to the file system entry.

In step 404, the file system entry is populated with file systemreferences. The file system references may be obtained from a filesystem manager that manages a file system that is associated with thefile system entry. The file system references may be obtained byrequesting them from the file system manager. In response, the filesystem manager may provide the file system references. The file systementry may be populated by adding copies of the file system references tothe file system entry.

In step 406, a reference counter, a current use counter, and a completeduse counter are initialized. The reference counter may be initialized byadding a counter to the file system entry and setting the value of thecounter in a manner to indicate that all of the file system referencesof the file system entry are available (e.g., have not be assigned).

The current use counter may be initialized by adding a counter to thefile system entry and setting the value of the counter in a manner toindicate that no assignments of file system references have beeninitiated.

The completed use counter may be initialized by adding a counter to thefile system entry and setting the value of the counter in a manner toindicate that no assignments of file system references have been startedbut are not yet complete. For example, the value of the completed usecounter may be set to match that of the current use counter.

In step 408, an availability indicator is instantiated. The availabilityindicator may be instantiated by adding a flag to the file system entrythat indicates that the file system associated with the file systementry is available.

The method may end following step 408.

Returning to FIG. 3, a file system entry may be repopulated when themethod of FIG. 3 is performed in scenarios in which an existing filesystem entry does not include any file system references to assign. FIG.5 shows a flowchart of a method in accordance with one or moreembodiments of the invention. The method depicted in FIG. 5 may be usedto repopulate a file system entry in accordance with one or moreembodiments of the invention. The method shown in FIG. 5 may beperformed by, for example, a file system reference manager (e.g., 104,FIG. 1). Other components of the system in FIG. 1 may perform all, or aportion, of the method of FIG. 5 without departing from the invention.

While FIG. 5 is illustrated as a series of steps, any of the steps maybe omitted, performed in a different order, additional steps may beincluded, and/or any or all of the steps may be performed in a paralleland/or partially overlapping manner without departing from theinvention.

In step 500, an availability indicator of a file system entry is set toindicate that the file system entry is inactive. In other words, theavailability indicator is set to indicate that the file system entry maynot be utilized.

In step 502, the file system entry is re-populated with file systemreferences. The file system references may be obtained from a filesystem manager that manages a file system that is associated with thefile system entry. The file system references may be obtained byrequesting them from the file system manager. In response, the filesystem manager may provide the file system references. The file systementry may be re-populated by removing existing file system referencesfrom the file system entry and adding copies of the newly obtained filesystem references to the file system entry.

In step 504, the existing reference counter, current counter, andcompleted use counter are reinitialized.

The reference counter may be reinitialized setting the value of thecounter in a manner to indicate that all of the file system referencesof the file system entry are available (e.g., have not been assigned).

The current use counter may be reinitialized by setting the value of thecounter in a manner to indicate that no assignments of file systemreferences have been initiated.

The completed use counter may be reinitialized by setting the value ofthe counter in a manner to indicate that no assignments of file systemreferences have been started but are not yet complete. For example, thevalue of the completed use counter may be set to match that of thecurrent use counter.

In step 506, the availability indicator is set to indicate that the filesystem entry is active. The availability indicator may be a flag of thefile system entry that indicates that the file system associated withthe file system entry is available.

The method may end following step 506.

Returning to FIG. 3, file system references may be obtained from a filesystem entry when the method of FIG. 3 is performed. FIG. 6 shows aflowchart of a method in accordance with one or more embodiments of theinvention. The method depicted in FIG. 6 may be used to repopulate afile system entry in accordance with one or more embodiments of theinvention. The method shown in FIG. 6 may be performed by, for example,a file system reference manager (e.g., 104, FIG. 1). Other components ofthe system in FIG. 1 may perform all, or a portion, of the method ofFIG. 6 without departing from the invention.

While FIG. 6 is illustrated as a series of steps, any of the steps maybe omitted, performed in a different order, additional steps may beincluded, and/or any or all of the steps may be performed in a paralleland/or partially overlapping manner without departing from theinvention.

In step 600, a reference counter is modified to indicate use of a filesystem reference. The reference counter may be modified by incrementing,decrementing, or otherwise modifying the value of the reference counterto indicate use of the file system reference. In other words, the filesystem reference that is being assigned.

In step 602, a current use counter is modified to indicate use of thefile system entry. The current use counter may be modified byincrementing, decrementing, or otherwise modifying the value of thecurrent use counter to indicate that an assignment has been initiatedusing the file system entry. In other words, to indicate that otherentities should not use the file system entry (e.g., that the entry islocked).

In step 604, a file system reference is obtained. The file systemreference may be obtained by identifying the file system reference inthe file system entry based on a value of the reference counter of thefile system entry. As discussed above, the reference counter may have avalue that identifies a file system reference of the file system entrythat is not assigned and is available to be assigned.

In step 606, a completed use counter is modified to indicate non-use ofthe file system entry. The completed use counter may be modified byincrementing, decrementing, or otherwise modifying the value of thecompleted use counter to indicate that an assignment has been initiatedusing the file system entry and that the assignment is completed. Inother words, to indicate that other entities should may use the filesystem entry (e.g., that the entry is unlocked).

The method may end following step 606.

Utilizing the methods illustrated in FIGS. 3-6, a system in accordancewith embodiments of the invention may assign file system references sothat any number of entities (e.g., application) may access data storedin file systems. The method may utilize and in-memory data structurethat includes pre-allocated file system references. By doing so, asystem in accordance with embodiments of the invention may reduce theamount of time entities that desire access to data stored in filesystems are required to wait for file access. Consequently, a system inaccordance with embodiments of the invention may provide an improveduser experience by more quickly providing computer implemented servicesto users.

In some cases, it may be desirable to remove access to file systems thatinclude data. For example, file systems may need to be unmounted. FIG. 7shows a flowchart of a method in accordance with one or more embodimentsof the invention. The method depicted in FIG. 7 may be used to removeaccess to a file system in accordance with one or more embodiments ofthe invention. The method shown in FIG. 7 may be performed by, forexample, a file system reference manager (e.g., 104, FIG. 1). Othercomponents of the system in FIG. 1 may perform all, or a portion, of themethod of FIG. 7 without departing from the invention.

While FIG. 7 is illustrated as a series of steps, any of the steps maybe omitted, performed in a different order, additional steps may beincluded, and/or any or all of the steps may be performed in a paralleland/or partially overlapping manner without departing from theinvention.

In step 700, obtain an access removal request for a file system. Theaccess removal request may, for example, request that the file system beunmounted. The access removal request may be obtained from a messagereceived from any entity (e.g., an application, an operating system,etc.).

In step 702, set an availability indicator to indicate that a filesystem entry is inactive. The file system entry may be associated withthe file system (e.g., may include an identifier of the file system).The availability indicator may be set by changing a value of theavailability indicator to indicate that the file system entry isinactive.

In step 704, it is determined whether the file system entry is currentlyin use. The determination may be made by comparing the values of atleast two counter included in the file system entry. For example, thevalue of a current use counter (e.g., 210, FIG. 2) may be compared tothe value of a completed use counter (e.g., 212, FIG. 2). If the valuesmatch, then the file system entry may be determined as currently notbeing in use. If the values differ, then the file system entry may bedetermined as currently being in use.

If it is determined that the file system entry is currently in use, themethod may proceed to step 706. If it is determined that the file systementry is not currently in use, the method may proceed to step 708.

In step 706, some amount of time may be waited. In other words, when thefile system entry is currently in use, the system may wait until thefile system entry is not currently in use before proceeding to step 708.

In step 708, the file system entry is deleted.

The method may end following step 708.

Using the method illustrated in FIG. 7, a file system may be renderedinaccessible (e.g., unmounted) even when file system references areprovided using an in-memory data structure rather than being obtained bya file system manager.

To further clarify embodiments of the invention, a non-limiting exampleis provided in FIGS. 8.1-8.3. FIG. 8.1 may illustrate a system similarto that illustrated in FIG. 1. FIGS. 8.2-8.3 may illustrate interactionsbetween components and/or actions performed by the components of thesystem of FIG. 8.1 over time. For the sake of brevity, only a limitednumber of components of the system of FIG. 1.1 are illustrated in eachof FIGS. 8.1-8.3.

Example

Consider a scenario as illustrated in FIG. 8.1 in which a database (800)application is utilizing resources provided by a system. To provideresources to the database (800), an operating system (802) utilizesservices provided by a file system manager (804) and a file systemreference manager (806).

To provide file system reference assignment services, the file systemreference manager (806) utilizes a file system reference list (816)stored in a memory module (814).

At the point in time illustrated in FIG. 8.1, a new hard disk (810) hasbeen added to the system. The file system manager (804) manages the filesystem (812) that organizes the data stored in the hard disk (810).

Turning to FIGS. 8.2-8.3, the aforementioned figures illustrateinteractions and actions between components of the system of FIG. 8.1.In these figures, the relative occurrence in time of the interactionsprogresses from the top of each figure (i.e., earlier in time) to thebottom of each figure (i.e., later in time). FIG. 8.3 is a continuationof the diagram of FIG. 8.2. In other words, element 820 indicates thefirst interaction that occurs in time while element 840 indicates thelast interaction that occurs.

Turning to FIG. 8.2, after the hard disk is added at a first point intime, the file system reference manager (806) identifies that a new filesystem (820) is available for which the file system reference manager(806) may provide file system reference assignment services.

In response identifying the new file system (820), the file systemreference manager (806) attempts to obtain file system references forthe file system by sending a references request (822) to the file systemmanager (804) that manages the new file system (820). The referencesrequest (822) is a request for file system references from the newlyadded file system.

In response to obtaining the references request (822), the file systemmanager (804) allocates a number of references and provides thereferences (824) to the file system reference manager (806). While thefile system manager (804) is allocating the number of references, thefile system manager (804) locks the file system resulting in otherentities not being able to access the data in the file system during theallocation.

After the file system reference manager (806) obtains the references(824), the file system reference manager (806) generates a file systementry in memory (826) for the file system. The generated entry includesthe references (824), flags, and counters as discussed with respect toFIG. 2.

After the file system entry is generated, the database (800) requestsaccess to the files system by sending a reference request (828) to theoperating system. In response to receiving the reference request (828),the operating system (802) forwards the reference request (830) to thefile system reference manager (806).

In response to receiving the reference request (830), the file systemreference manager (806) verifies that the file system entry is active(832). To do so, the file system reference manager (806) checks to seewhether the current use counter and completed use counter of the filesystem entry have the same value. In this example, the counters have thesame value and the file system reference manager (806) proceeds. Had thecounters had different values, the file system reference manager (806)would have waited until the aforementioned counters had the same valuebefore proceeding to verify that the file system entry was not in usefor other file system reference assignments.

After verifying that the file system entry is active (832), the filesystem reference manager (806) locks the file system entry (834) inpreparation for allocating the file system reference for the database(800). To do so, the file system reference manager (806) increments thevalue of the current use counter.

After locking the file system entry (834), the file system referencemanager (806) obtains the file system reference (836) from the filesystem entry. Additionally, the file system reference manager (806)increments the reference counter to indicate that the file systemreference (836) is allocated.

After obtaining the file system reference (836), the file systemreference manager (806) provides the file system reference (838) to thedatabase (800). By doing so, the database (800) is able to access datain the file system managed by the file system manager (804) using thefile system reference (838).

After providing the file system reference, the file system referencemanager (806) unlocks the file system entry (840) as illustrated in FIG.8.3. To do so, the file system reference manager (806) increments thecompleted use counter of the file system entry. By doing so, the currentuse counter and completed use counters have the same value therebyindicating that the file system entry is available for use (e.g.,active).

End of Example

Thus, as illustrated in FIGS. 8.1-8.3, embodiments of the invention mayprovide a method for providing file system references on demand withoutneeding to lock the file system at the time of assignment of the filesystem references. By doing so, a system in accordance with embodimentsof the invention may be able service a much larger file system referenceassignments without impacting a user experience.

As discussed above, embodiments of the invention may be implementedusing computing devices. FIG. 9 shows a diagram of a computing device inaccordance with one or more embodiments of the invention. The computingdevice (900) may include one or more computer processors (902),non-persistent storage (904) (e.g., volatile memory, such as randomaccess memory (RAM), cache memory), persistent storage (906) (e.g., ahard disk, an optical drive such as a compact disk (CD) drive or digitalversatile disk (DVD) drive, a flash memory, etc.), a communicationinterface (912) (e.g., Bluetooth interface, infrared interface, networkinterface, optical interface, etc.), input devices (910), output devices(908), and numerous other elements (not shown) and functionalities. Eachof these components is described below.

In one embodiment of the invention, the computer processor(s) (902) maybe an integrated circuit for processing instructions. For example, thecomputer processor(s) may be one or more cores or micro-cores of aprocessor. The computing device (900) may also include one or more inputdevices (910), such as a touchscreen, keyboard, mouse, microphone,touchpad, electronic pen, or any other type of input device. Further,the communication interface (912) may include an integrated circuit forconnecting the computing device (900) to a network (not shown) (e.g., alocal area network (LAN), a wide area network (WAN) such as theInternet, mobile network, or any other type of network) and/or toanother device, such as another computing device.

In one embodiment of the invention, the computing device (900) mayinclude one or more output devices (908), such as a screen (e.g., aliquid crystal display (LCD), a plasma display, touchscreen, cathode raytube (CRT) monitor, projector, or other display device), a printer,external storage, or any other output device. One or more of the outputdevices may be the same or different from the input device(s). The inputand output device(s) may be locally or remotely connected to thecomputer processor(s) (902), non-persistent storage (904), andpersistent storage (906). Many different types of computing devicesexist, and the aforementioned input and output device(s) may take otherforms.

Embodiments of the invention may provide a method for assigning filesystem references. To do so, embodiments of the invention may provide asystem that pre-allocates file system references before they are needed.Specifically, embodiments of the invention may store pre-allocated filesystem references in an in-memory data structure. By doing so, thecomputational impact on the system for providing file system referencesmay be time shifted away from when the file system reference requestsare received. Accordingly, a system in accordance with embodiments ofthe invention may be capable of servicing a larger number of file systemreference assignment requests which may improve a user experience.

Thus, embodiments of the invention may address the problem of limitedcomputational resource availability for providing file system referenceassignments in a distributed environment.

The problems discussed above should be understood as being examples ofproblems solved by embodiments of the invention of the invention and theinvention should not be limited to solving the same/similar problems.The disclosed invention is broadly applicable to address a range ofproblems beyond those discussed herein.

One or more embodiments of the invention may be implemented usinginstructions executed by one or more processors of a computing device.Further, such instructions may correspond to computer readableinstructions that are stored on one or more non-transitory computerreadable mediums.

While the invention has been described above with respect to a limitednumber of embodiments, those skilled in the art, having the benefit ofthis disclosure, will appreciate that other embodiments can be devisedwhich do not depart from the scope of the invention as of the invention.Accordingly, the scope of the invention should be limited only by theattached claims.

What is claimed is:
 1. A system for managing file systems, comprising:memory; and a manager programmed to: obtain file system references for afile system from a file system manager that utilizes storage to providethe file system references; store the file system references in anin-memory data structure in the memory; and service a file systemreference request for the file system using the in-memory datastructure.
 2. The system of claim 1, wherein obtaining the file systemreferences allocates the file system references in the file system. 3.The system of claim 1, wherein servicing the file system referencerequest for the file system using the in-memory data structurecomprises: obtaining the file system reference request; in response toobtaining the file system reference request: making a determination thata portion of the in-memory data structure associated with the filesystem is in an active activity state; in response to making thedetermination: obtaining a file system reference using the portion ofthe in-memory data structure; and providing the file system reference toan entity to service the file system reference request.
 4. The system ofclaim 3, wherein the activity state indicates that the portion of thein-memory data structure may be used to assign the file system referencewithout colliding with a second assignment of the file system reference.5. The system of claim 3, wherein obtaining the file system referenceusing the portion of the in-memory data structure comprises: modifyingthe activity state of the portion of the in-memory data structure to aninactive activity state; after changing the activity state and while theactivity state is in the inactive activity state: assigning the filesystem reference to the entity; modifying the portion of the in-memorydata structure to indicate that the file system reference is assigned;and modifying the activity state of the portion of the in-memory datastructure to active.
 6. The system of claim 1, wherein servicing thefile system reference request for the file system using the in-memorydata structure comprises: obtaining the file system reference request;in response to obtaining the file system reference request: making adetermination that a portion of the in-memory data structure associatedwith the file system is in an inactive activity state; in response tomaking the determination: obtaining a file system reference from thefile system manager; and providing the file system reference to anentity to service the file system reference request.
 7. The system ofclaim 6, wherein the file system reference is not duplicative of any ofthe file system references.
 8. A method for managing file systems,comprising: obtaining file system references for a file system from afile system manager that utilizes storage to provide the file systemreferences; storing the file system references in an in-memory datastructure; and servicing a file system reference request for the filesystem using the in-memory data structure.
 9. The method of claim 8,wherein obtaining the file system references allocates the file systemreferences in the file system.
 10. The method of claim 8, whereinservicing the file system reference request for the file system usingthe in-memory data structure comprises: obtaining the file systemreference request; in response to obtaining the file system referencerequest: making a determination that a portion of the in-memory datastructure associated with the file system is in an active activitystate; in response to making the determination: obtaining a file systemreference using the portion of the in-memory data structure; andproviding the file system reference to an entity to service the filesystem reference request.
 11. The method of claim 10, wherein theactivity state indicates that the portion of the in-memory datastructure may be used to assign the file system reference withoutcolliding with a second assignment of the file system reference.
 12. Themethod of claim 10, wherein obtaining the file system reference usingthe portion of the in-memory data structure comprises: modifying theactivity state of the portion of the in-memory data structure to aninactive activity state; after changing the activity state and while theactivity state is in the inactive activity state: assigning the filesystem reference to the entity; modifying the portion of the in-memorydata structure to indicate that the file system reference is assigned;and modifying the activity state of the portion of the in-memory datastructure to active.
 13. The method of claim 8, wherein servicing thefile system reference request for the file system using the in-memorydata structure comprises: obtaining the file system reference request;in response to obtaining the file system reference request: making adetermination that a portion of the in-memory data structure associatedwith the file system is in an inactive activity state; in response tomaking the determination: obtaining a file system reference from thefile system manager; and providing the file system reference to anentity to service the file system reference request.
 14. The method ofclaim 13, wherein the file system reference is not duplicative of any ofthe file system references.
 15. A non-transitory computer readablemedium comprising computer readable program code, which when executed bya computer processor enables the computer processor to perform a methodfor managing file systems, the method comprising: obtaining file systemreferences for a file system from a file system manager that utilizesstorage to provide the file system references; storing the file systemreferences in an in-memory data structure; and servicing a file systemreference request for the file system using the in-memory datastructure.
 16. The non-transitory computer readable medium of claim 15,wherein obtaining the file system references allocates the file systemreferences in the file system.
 17. The non-transitory computer readablemedium of claim 15, wherein servicing the file system reference requestfor the file system using the in-memory data structure comprises:obtaining the file system reference request; in response to obtainingthe file system reference request: making a determination that a portionof the in-memory data structure associated with the file system is in anactive activity state; in response to making the determination:obtaining a file system reference using the portion of the in-memorydata structure; and providing the file system reference to an entity toservice the file system reference request.
 18. The non-transitorycomputer readable medium of claim 17, wherein the activity stateindicates that the portion of the in-memory data structure may be usedto assign the file system reference without colliding with a secondassignment of the file system reference.
 19. The non-transitory computerreadable medium of claim 17, wherein obtaining the file system referenceusing the portion of the in-memory data structure comprises: modifyingthe activity state of the portion of the in-memory data structure to aninactive activity state; after changing the activity state and while theactivity state is in the inactive activity state: assigning the filesystem reference to the entity; modifying the portion of the in-memorydata structure to indicate that the file system reference is assigned;and modifying the activity state of the portion of the in-memory datastructure to active.
 20. The non-transitory computer readable medium ofclaim 15, wherein servicing the file system reference request for thefile system using the in-memory data structure comprises: obtaining thefile system reference request; in response to obtaining the file systemreference request: making a determination that a portion of thein-memory data structure associated with the file system is in aninactive activity state; in response to making the determination:obtaining a file system reference from the file system manager; andproviding the file system reference to an entity to service the filesystem reference request.